<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Arduino AudioKit HAL: AudioKit Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Arduino AudioKit HAL
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_audio_kit-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">AudioKit Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_audio_kit.html" title="AudioKit API using the audio_hal.">AudioKit</a> API using the audio_hal.  
 <a href="class_audio_kit.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae7f2a59c6f2bd31db85d75a65cec8ef0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_audio_kit_config.html">AudioKitConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#ae7f2a59c6f2bd31db85d75a65cec8ef0">defaultConfig</a> (AudioKitInOut inout=AudioInputOutput)</td></tr>
<tr class="memdesc:ae7f2a59c6f2bd31db85d75a65cec8ef0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides the default configuration for input or output.  <br /></td></tr>
<tr class="separator:ae7f2a59c6f2bd31db85d75a65cec8ef0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a903b3aee6597dfcb1de40f72f2b18a1b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a903b3aee6597dfcb1de40f72f2b18a1b">begin</a> (<a class="el" href="struct_audio_kit_config.html">AudioKitConfig</a> cnfg)</td></tr>
<tr class="memdesc:a903b3aee6597dfcb1de40f72f2b18a1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the codec.  <br /></td></tr>
<tr class="separator:a903b3aee6597dfcb1de40f72f2b18a1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6a8fa774b9a73c208418aa4fa9299cd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#ab6a8fa774b9a73c208418aa4fa9299cd">end</a> ()</td></tr>
<tr class="memdesc:ab6a8fa774b9a73c208418aa4fa9299cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the CODEC.  <br /></td></tr>
<tr class="separator:ab6a8fa774b9a73c208418aa4fa9299cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afca95325642573eab6c4ad5ce0924063"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_audio_kit_config.html">AudioKitConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#afca95325642573eab6c4ad5ce0924063">config</a> ()</td></tr>
<tr class="memdesc:afca95325642573eab6c4ad5ce0924063"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides the actual configuration.  <br /></td></tr>
<tr class="separator:afca95325642573eab6c4ad5ce0924063"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64f95fca0a6f059803268dab33bf5d2c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a64f95fca0a6f059803268dab33bf5d2c">setActive</a> (bool active)</td></tr>
<tr class="memdesc:a64f95fca0a6f059803268dab33bf5d2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the codec active / inactive.  <br /></td></tr>
<tr class="separator:a64f95fca0a6f059803268dab33bf5d2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac99fb5dfb87a965451e076f404224fd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#aac99fb5dfb87a965451e076f404224fd">setMute</a> (bool mute)</td></tr>
<tr class="memdesc:aac99fb5dfb87a965451e076f404224fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mutes the output.  <br /></td></tr>
<tr class="separator:aac99fb5dfb87a965451e076f404224fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adae205b1d34fa8c3c00ac891f980a7dd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#adae205b1d34fa8c3c00ac891f980a7dd">setVolume</a> (int vol)</td></tr>
<tr class="memdesc:adae205b1d34fa8c3c00ac891f980a7dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100.  <br /></td></tr>
<tr class="separator:adae205b1d34fa8c3c00ac891f980a7dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d8fe8f564faf19535f9686aa23ed414"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a7d8fe8f564faf19535f9686aa23ed414">volume</a> ()</td></tr>
<tr class="memdesc:a7d8fe8f564faf19535f9686aa23ed414"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines the volume %.  <br /></td></tr>
<tr class="separator:a7d8fe8f564faf19535f9686aa23ed414"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a752aaff497b20ea1ea4e9840f61dae80"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a752aaff497b20ea1ea4e9840f61dae80">setSampleRate</a> (audio_hal_iface_samples_t sample_rate)</td></tr>
<tr class="memdesc:a752aaff497b20ea1ea4e9840f61dae80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Just update the sample rate.  <br /></td></tr>
<tr class="separator:a752aaff497b20ea1ea4e9840f61dae80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8409bf2cc841dc21d541e411e7971b08"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a8409bf2cc841dc21d541e411e7971b08">pinAuxin</a> ()</td></tr>
<tr class="memdesc:a8409bf2cc841dc21d541e411e7971b08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the gpio number for auxin detection.  <br /></td></tr>
<tr class="separator:a8409bf2cc841dc21d541e411e7971b08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a027e2297736e4108330ff0c6aa423046"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a027e2297736e4108330ff0c6aa423046">pinHeadphoneDetect</a> ()</td></tr>
<tr class="memdesc:a027e2297736e4108330ff0c6aa423046"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the gpio number for headphone detection.  <br /></td></tr>
<tr class="separator:a027e2297736e4108330ff0c6aa423046"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43c7177de0f35ef6ec97ed48c7a7363e"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a43c7177de0f35ef6ec97ed48c7a7363e">pinPaEnable</a> ()</td></tr>
<tr class="memdesc:a43c7177de0f35ef6ec97ed48c7a7363e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the gpio number for PA enable.  <br /></td></tr>
<tr class="separator:a43c7177de0f35ef6ec97ed48c7a7363e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f9a343c9f16b16ecf8f792b42914bc4"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a2f9a343c9f16b16ecf8f792b42914bc4">pinAdcDetect</a> ()</td></tr>
<tr class="memdesc:a2f9a343c9f16b16ecf8f792b42914bc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the gpio number for adc detection.  <br /></td></tr>
<tr class="separator:a2f9a343c9f16b16ecf8f792b42914bc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72eb882cc63c1a31460dde328216ef2f"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a72eb882cc63c1a31460dde328216ef2f">pinEs7243Mclk</a> ()</td></tr>
<tr class="memdesc:a72eb882cc63c1a31460dde328216ef2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the mclk gpio number of es7243.  <br /></td></tr>
<tr class="separator:a72eb882cc63c1a31460dde328216ef2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f341c11af3fa7f0dcbe4ed7ef4f8319"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a5f341c11af3fa7f0dcbe4ed7ef4f8319">pinInputRec</a> ()</td></tr>
<tr class="memdesc:a5f341c11af3fa7f0dcbe4ed7ef4f8319"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the record-button id for adc-button.  <br /></td></tr>
<tr class="separator:a5f341c11af3fa7f0dcbe4ed7ef4f8319"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d8b8e1fc20132d649b3a461e2d553d5"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a6d8b8e1fc20132d649b3a461e2d553d5">pinInputMode</a> ()</td></tr>
<tr class="memdesc:a6d8b8e1fc20132d649b3a461e2d553d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number for mode-button.  <br /></td></tr>
<tr class="separator:a6d8b8e1fc20132d649b3a461e2d553d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5e346727769ad17aa04c2b9efbbaf5a"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#ae5e346727769ad17aa04c2b9efbbaf5a">pinInputSet</a> ()</td></tr>
<tr class="memdesc:ae5e346727769ad17aa04c2b9efbbaf5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get number for set function.  <br /></td></tr>
<tr class="separator:ae5e346727769ad17aa04c2b9efbbaf5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec9211dccce5236427d96b9193e9f5cb"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#aec9211dccce5236427d96b9193e9f5cb">pinInputPlay</a> ()</td></tr>
<tr class="memdesc:aec9211dccce5236427d96b9193e9f5cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get number for play function.  <br /></td></tr>
<tr class="separator:aec9211dccce5236427d96b9193e9f5cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a322b6834d0d24a31c92ab2e1bcf5dfc8"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a322b6834d0d24a31c92ab2e1bcf5dfc8">pinVolumeUp</a> ()</td></tr>
<tr class="memdesc:a322b6834d0d24a31c92ab2e1bcf5dfc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">number for volume up function  <br /></td></tr>
<tr class="separator:a322b6834d0d24a31c92ab2e1bcf5dfc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab57147058b00536b64f7045d03729771"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#ab57147058b00536b64f7045d03729771">pinVolumeDown</a> ()</td></tr>
<tr class="memdesc:ab57147058b00536b64f7045d03729771"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get number for volume down function.  <br /></td></tr>
<tr class="separator:ab57147058b00536b64f7045d03729771"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbb606132fa17bb1634c67a5c56f6329"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#adbb606132fa17bb1634c67a5c56f6329">pinResetCodec</a> ()</td></tr>
<tr class="memdesc:adbb606132fa17bb1634c67a5c56f6329"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get reset codec gpio number.  <br /></td></tr>
<tr class="separator:adbb606132fa17bb1634c67a5c56f6329"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac57425ba16af4f55b64e62447ad88a1f"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#ac57425ba16af4f55b64e62447ad88a1f">pinResetBoard</a> ()</td></tr>
<tr class="memdesc:ac57425ba16af4f55b64e62447ad88a1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get gpio number to reset the board.  <br /></td></tr>
<tr class="separator:ac57425ba16af4f55b64e62447ad88a1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08284422f36622d2907ff9babf298213"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a08284422f36622d2907ff9babf298213">pinGreenLed</a> ()</td></tr>
<tr class="memdesc:a08284422f36622d2907ff9babf298213"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get gpio number for green led.  <br /></td></tr>
<tr class="separator:a08284422f36622d2907ff9babf298213"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae86795128c627c1aa3b2814e1b621dbc"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#ae86795128c627c1aa3b2814e1b621dbc">pinBlueLed</a> ()</td></tr>
<tr class="memdesc:ae86795128c627c1aa3b2814e1b621dbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get blue led gpio number.  <br /></td></tr>
<tr class="separator:ae86795128c627c1aa3b2814e1b621dbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e651dc5d8d90c1e89edc833b5188951"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a3e651dc5d8d90c1e89edc833b5188951">pinSpiCs</a> ()</td></tr>
<tr class="memdesc:a3e651dc5d8d90c1e89edc833b5188951"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI CS Pin for SD Drive.  <br /></td></tr>
<tr class="separator:a3e651dc5d8d90c1e89edc833b5188951"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff34dc957824c6618a02e517a3b20221"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#aff34dc957824c6618a02e517a3b20221">setSpeakerActive</a> (bool active)</td></tr>
<tr class="memdesc:aff34dc957824c6618a02e517a3b20221"><td class="mdescLeft">&#160;</td><td class="mdescRight">Activates/deactivates the speaker amplifier output This is working only if the driver is supporting the functionality.  <br /></td></tr>
<tr class="separator:aff34dc957824c6618a02e517a3b20221"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ad4e2e3004efe2769f9746df240b22a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a0ad4e2e3004efe2769f9746df240b22a">headphoneStatus</a> ()</td></tr>
<tr class="memdesc:a0ad4e2e3004efe2769f9746df240b22a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the headphone was detected.  <br /></td></tr>
<tr class="separator:a0ad4e2e3004efe2769f9746df240b22a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae882b7e764b7b5fe978d470648cab80c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#ae882b7e764b7b5fe978d470648cab80c">isSDActive</a> ()</td></tr>
<tr class="memdesc:ae882b7e764b7b5fe978d470648cab80c"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if the SD is active  <br /></td></tr>
<tr class="separator:ae882b7e764b7b5fe978d470648cab80c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a75fc2200b171c9b477f2f100b8a18104"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a75fc2200b171c9b477f2f100b8a18104">actionHeadphoneDetection</a> ()</td></tr>
<tr class="memdesc:a75fc2200b171c9b477f2f100b8a18104"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch off the PA if the headphone in plugged in and switch it on again if the headphone is unplugged.  <br /></td></tr>
<tr class="separator:a75fc2200b171c9b477f2f100b8a18104"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:accb5ea6f7ee146cbd512552e039ac5ac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#accb5ea6f7ee146cbd512552e039ac5ac">setupHeadphoneDetection</a> ()</td></tr>
<tr class="memdesc:accb5ea6f7ee146cbd512552e039ac5ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup the headphone detection.  <br /></td></tr>
<tr class="separator:accb5ea6f7ee146cbd512552e039ac5ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a1b343a0c28811ea8c6bc1c08eba2eb06"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a1b343a0c28811ea8c6bc1c08eba2eb06">is_active</a> = false</td></tr>
<tr class="separator:a1b343a0c28811ea8c6bc1c08eba2eb06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0010684767aaabad3a17e814de29a706"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_audio_kit_config.html">AudioKitConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a0010684767aaabad3a17e814de29a706">cfg</a></td></tr>
<tr class="separator:a0010684767aaabad3a17e814de29a706"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa41e2c821c6f241a73087cef961584c6"><td class="memItemLeft" align="right" valign="top">audio_hal_codec_config_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#aa41e2c821c6f241a73087cef961584c6">audio_hal_conf</a></td></tr>
<tr class="separator:aa41e2c821c6f241a73087cef961584c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd988074ddfa3dfd5af0c5abb49cd813"><td class="memItemLeft" align="right" valign="top">audio_hal_handle_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#afd988074ddfa3dfd5af0c5abb49cd813">hal_handle</a> = 0</td></tr>
<tr class="separator:afd988074ddfa3dfd5af0c5abb49cd813"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49abf7c51694cbfd5f11e013a6e6f687"><td class="memItemLeft" align="right" valign="top">audio_hal_codec_i2s_iface_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a49abf7c51694cbfd5f11e013a6e6f687">iface</a></td></tr>
<tr class="separator:a49abf7c51694cbfd5f11e013a6e6f687"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a770158e788b901e35a0ac9a97392a67c"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a770158e788b901e35a0ac9a97392a67c">spi_cs_pin</a></td></tr>
<tr class="separator:a770158e788b901e35a0ac9a97392a67c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0acc1eda4fe16d9134eec14d07a98c3c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a0acc1eda4fe16d9134eec14d07a98c3c">headphoneIsConnected</a> = false</td></tr>
<tr class="separator:a0acc1eda4fe16d9134eec14d07a98c3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadbbd40a678301a7963b1eeca0a5d8d2"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#aadbbd40a678301a7963b1eeca0a5d8d2">speakerChangeTimeout</a> = 0</td></tr>
<tr class="separator:aadbbd40a678301a7963b1eeca0a5d8d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0704b3538e7b3a586b9046ba0c12dd51"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_audio_kit.html#a0704b3538e7b3a586b9046ba0c12dd51">headphonePin</a> = -1</td></tr>
<tr class="separator:a0704b3538e7b3a586b9046ba0c12dd51"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_audio_kit.html" title="AudioKit API using the audio_hal.">AudioKit</a> API using the audio_hal. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00216">216</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a89d24513e6fb42cf2a41364322dca854" name="a89d24513e6fb42cf2a41364322dca854"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89d24513e6fb42cf2a41364322dca854">&#9670;&#160;</a></span>AudioKit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">AudioKit::AudioKit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00219">219</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  219</span>             {</div>
<div class="line"><span class="lineno">  220</span>    <span class="comment">// setup SPI for SD drives</span></div>
<div class="line"><span class="lineno">  221</span>    selfAudioKit = <span class="keyword">this</span>;</div>
<div class="line"><span class="lineno">  222</span>    <span class="comment">// added to constructor so that SPI is setup as part of global variable setup</span></div>
<div class="line"><span class="lineno">  223</span><span class="preprocessor">#if SETUP_ESP32_I2S &amp;&amp; defined(ESP32)</span></div>
<div class="line"><span class="lineno">  224</span>    setupSPI();</div>
<div class="line"><span class="lineno">  225</span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="lineno">  226</span>  }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a75fc2200b171c9b477f2f100b8a18104" name="a75fc2200b171c9b477f2f100b8a18104"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75fc2200b171c9b477f2f100b8a18104">&#9670;&#160;</a></span>actionHeadphoneDetection()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void AudioKit::actionHeadphoneDetection </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Switch off the PA if the headphone in plugged in and switch it on again if the headphone is unplugged. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00582">582</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  582</span>                                         {</div>
<div class="line"><span class="lineno">  583</span>    <span class="keywordflow">if</span> (selfAudioKit-&gt;headphonePin&gt;0){</div>
<div class="line"><span class="lineno">  584</span> </div>
<div class="line"><span class="lineno">  585</span>      <span class="comment">// detect changes</span></div>
<div class="line"><span class="lineno">  586</span>      <span class="keywordtype">bool</span> isConnected = selfAudioKit-&gt;<a class="code hl_function" href="class_audio_kit.html#a0ad4e2e3004efe2769f9746df240b22a">headphoneStatus</a>();</div>
<div class="line"><span class="lineno">  587</span>      <span class="keywordflow">if</span> (selfAudioKit-&gt;headphoneIsConnected != isConnected) {</div>
<div class="line"><span class="lineno">  588</span>        selfAudioKit-&gt;headphoneIsConnected = isConnected;</div>
<div class="line"><span class="lineno">  589</span> </div>
<div class="line"><span class="lineno">  590</span>        <span class="comment">// update if things have stabilized</span></div>
<div class="line"><span class="lineno">  591</span>        <span class="keywordtype">bool</span> powerActive = !isConnected;</div>
<div class="line"><span class="lineno">  592</span>        KIT_LOGW(<span class="stringliteral">&quot;Headphone jack has been %s&quot;</span>, isConnected ? <span class="stringliteral">&quot;inserted&quot;</span> : <span class="stringliteral">&quot;removed&quot;</span>);</div>
<div class="line"><span class="lineno">  593</span>        selfAudioKit-&gt;<a class="code hl_function" href="class_audio_kit.html#aff34dc957824c6618a02e517a3b20221">setSpeakerActive</a>(powerActive);</div>
<div class="line"><span class="lineno">  594</span>      }</div>
<div class="line"><span class="lineno">  595</span>    }</div>
<div class="line"><span class="lineno">  596</span>    yield();</div>
<div class="line"><span class="lineno">  597</span>  }</div>
<div class="ttc" id="aclass_audio_kit_html_a0ad4e2e3004efe2769f9746df240b22a"><div class="ttname"><a href="class_audio_kit.html#a0ad4e2e3004efe2769f9746df240b22a">AudioKit::headphoneStatus</a></div><div class="ttdeci">bool headphoneStatus()</div><div class="ttdoc">Returns true if the headphone was detected.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00606">AudioKitHAL.h:606</a></div></div>
<div class="ttc" id="aclass_audio_kit_html_aff34dc957824c6618a02e517a3b20221"><div class="ttname"><a href="class_audio_kit.html#aff34dc957824c6618a02e517a3b20221">AudioKit::setSpeakerActive</a></div><div class="ttdeci">void setSpeakerActive(bool active)</div><div class="ttdoc">Activates/deactivates the speaker amplifier output This is working only if the driver is supporting t...</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00568">AudioKitHAL.h:568</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a903b3aee6597dfcb1de40f72f2b18a1b" name="a903b3aee6597dfcb1de40f72f2b18a1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a903b3aee6597dfcb1de40f72f2b18a1b">&#9670;&#160;</a></span>begin()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::begin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_audio_kit_config.html">AudioKitConfig</a>&#160;</td>
          <td class="paramname"><em>cnfg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Starts the codec. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00246">246</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  246</span>                                  {</div>
<div class="line"><span class="lineno">  247</span>    KIT_LOGI(LOG_METHOD);</div>
<div class="line"><span class="lineno">  248</span>    cfg = cnfg;</div>
<div class="line"><span class="lineno">  249</span>    KIT_LOGI(<span class="stringliteral">&quot;Selected board: %d&quot;</span>, AUDIOKIT_BOARD);</div>
<div class="line"><span class="lineno">  250</span> </div>
<div class="line"><span class="lineno">  251</span>    <span class="comment">// if already active we stop first</span></div>
<div class="line"><span class="lineno">  252</span>    <span class="keywordflow">if</span> (is_active){</div>
<div class="line"><span class="lineno">  253</span>      <a class="code hl_function" href="class_audio_kit.html#ab6a8fa774b9a73c208418aa4fa9299cd">end</a>();</div>
<div class="line"><span class="lineno">  254</span>    }</div>
<div class="line"><span class="lineno">  255</span> </div>
<div class="line"><span class="lineno">  256</span><span class="preprocessor">#if SETUP_ESP32_I2S &amp;&amp; defined(ESP32)</span></div>
<div class="line"><span class="lineno">  257</span>    <span class="comment">// release SPI for SD card if it is not necessary</span></div>
<div class="line"><span class="lineno">  258</span>    <span class="keywordflow">if</span> (AUDIOKIT_SETUP_SD &amp;&amp; !cfg.sd_active){</div>
<div class="line"><span class="lineno">  259</span>      p_spi-&gt;end();</div>
<div class="line"><span class="lineno">  260</span>    }</div>
<div class="line"><span class="lineno">  261</span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="lineno">  262</span>    <span class="comment">// setup headphone if necessary</span></div>
<div class="line"><span class="lineno">  263</span>    <a class="code hl_function" href="class_audio_kit.html#accb5ea6f7ee146cbd512552e039ac5ac">setupHeadphoneDetection</a>();</div>
<div class="line"><span class="lineno">  264</span> </div>
<div class="line"><span class="lineno">  265</span>    audio_hal_conf.adc_input = cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#a8ae224cfd264634f4e09e6208cbcf6c0">adc_input</a>;</div>
<div class="line"><span class="lineno">  266</span>    audio_hal_conf.dac_output = cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#a61712923e2b592811a9e97dbbc9cd108">dac_output</a>;</div>
<div class="line"><span class="lineno">  267</span>    audio_hal_conf.codec_mode = cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a>;</div>
<div class="line"><span class="lineno">  268</span>    audio_hal_conf.i2s_iface.mode = cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#add6c0604564d301e8582d8fc5a18d815">master_slave_mode</a>;</div>
<div class="line"><span class="lineno">  269</span>    audio_hal_conf.i2s_iface.fmt = cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#a9c3d9f350c847402b7100662ed0b3fe6">fmt</a>;</div>
<div class="line"><span class="lineno">  270</span>    audio_hal_conf.i2s_iface.samples = cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#adefddc85df8f2a25c605ce58b6dde31a">sample_rate</a>;</div>
<div class="line"><span class="lineno">  271</span>    audio_hal_conf.i2s_iface.bits = cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#a33583d45c4ab81f76d34712847e93907">bits_per_sample</a>;</div>
<div class="line"><span class="lineno">  272</span> </div>
<div class="line"><span class="lineno">  273</span>    <span class="comment">// init HAL</span></div>
<div class="line"><span class="lineno">  274</span>    <span class="keywordflow">if</span> (hal_handle == 0) {</div>
<div class="line"><span class="lineno">  275</span>      hal_handle = audio_hal_init(&amp;audio_hal_conf, &amp;AUDIO_DRIVER);</div>
<div class="line"><span class="lineno">  276</span>      <span class="keywordflow">if</span> (hal_handle == 0) {</div>
<div class="line"><span class="lineno">  277</span>        KIT_LOGE(<span class="stringliteral">&quot;audio_hal_init&quot;</span>);</div>
<div class="line"><span class="lineno">  278</span>        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno">  279</span>      }</div>
<div class="line"><span class="lineno">  280</span>    }</div>
<div class="line"><span class="lineno">  281</span> </div>
<div class="line"><span class="lineno">  282</span>    <span class="keywordflow">if</span> (cfg.is_i2s_active){</div>
<div class="line"><span class="lineno">  283</span> </div>
<div class="line"><span class="lineno">  284</span><span class="preprocessor">#if SETUP_ESP32_I2S &amp;&amp; defined(ESP32)</span></div>
<div class="line"><span class="lineno">  285</span>      <span class="comment">// setup i2s driver - with no queue</span></div>
<div class="line"><span class="lineno">  286</span>      i2s_config_t i2s_config = cfg.i2sConfig();</div>
<div class="line"><span class="lineno">  287</span>      <span class="keywordflow">if</span> (i2s_driver_install(cfg.i2s_num, &amp;i2s_config, 0, NULL) != ESP_OK) {</div>
<div class="line"><span class="lineno">  288</span>        KIT_LOGE(<span class="stringliteral">&quot;i2s_driver_install&quot;</span>);</div>
<div class="line"><span class="lineno">  289</span>        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno">  290</span>      }</div>
<div class="line"><span class="lineno">  291</span> </div>
<div class="line"><span class="lineno">  292</span>      <span class="comment">// define i2s pins</span></div>
<div class="line"><span class="lineno">  293</span>      i2s_pin_config_t pin_config = cfg.i2sPins();</div>
<div class="line"><span class="lineno">  294</span>      KIT_LOGI(<span class="stringliteral">&quot;i2s_set_pin&quot;</span>);</div>
<div class="line"><span class="lineno">  295</span> </div>
<div class="line"><span class="lineno">  296</span>      KIT_LOGI(<span class="stringliteral">&quot;- bck_io_num: %d&quot;</span>, pin_config.bck_io_num);</div>
<div class="line"><span class="lineno">  297</span>      KIT_LOGI(<span class="stringliteral">&quot;- ws_io_num: %d&quot;</span>, pin_config.ws_io_num);</div>
<div class="line"><span class="lineno">  298</span>      KIT_LOGI(<span class="stringliteral">&quot;- data_out_num: %d&quot;</span>, pin_config.data_out_num);</div>
<div class="line"><span class="lineno">  299</span>      KIT_LOGI(<span class="stringliteral">&quot;- data_in_num: %d&quot;</span>, pin_config.data_in_num);</div>
<div class="line"><span class="lineno">  300</span>      KIT_LOGI(<span class="stringliteral">&quot;- mck_io_num: %d&quot;</span>, pin_config.mck_io_num);</div>
<div class="line"><span class="lineno">  301</span> </div>
<div class="line"><span class="lineno">  302</span>      <span class="keywordflow">if</span> (i2s_set_pin(cfg.i2s_num, &amp;pin_config) != ESP_OK) {</div>
<div class="line"><span class="lineno">  303</span>        KIT_LOGE(<span class="stringliteral">&quot;i2s_set_pin&quot;</span>);</div>
<div class="line"><span class="lineno">  304</span>        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno">  305</span>      }</div>
<div class="line"><span class="lineno">  306</span> </div>
<div class="line"><span class="lineno">  307</span><span class="preprocessor">#if ESP_IDF_VERSION_MAJOR &lt; 4                  </span></div>
<div class="line"><span class="lineno">  308</span>      <span class="keywordflow">if</span> (i2s_mclk_gpio_select(cfg.i2s_num,(gpio_num_t)cfg.mclk_gpio) != ESP_OK) {</div>
<div class="line"><span class="lineno">  309</span>        KIT_LOGE(<span class="stringliteral">&quot;i2s_mclk_gpio_select&quot;</span>);</div>
<div class="line"><span class="lineno">  310</span>        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno">  311</span>      }</div>
<div class="line"><span class="lineno">  312</span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="lineno">  313</span> </div>
<div class="line"><span class="lineno">  314</span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="lineno">  315</span>    }</div>
<div class="line"><span class="lineno">  316</span> </div>
<div class="line"><span class="lineno">  317</span>    <span class="comment">// call start</span></div>
<div class="line"><span class="lineno">  318</span>    <span class="keywordflow">if</span> (!<a class="code hl_function" href="class_audio_kit.html#a64f95fca0a6f059803268dab33bf5d2c">setActive</a>(<span class="keyword">true</span>)) {</div>
<div class="line"><span class="lineno">  319</span>      KIT_LOGE(<span class="stringliteral">&quot;setActive&quot;</span>);</div>
<div class="line"><span class="lineno">  320</span>      <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno">  321</span>    }</div>
<div class="line"><span class="lineno">  322</span> </div>
<div class="line"><span class="lineno">  323</span>    <span class="comment">// activate speaker when output not earphones only</span></div>
<div class="line"><span class="lineno">  324</span>    <a class="code hl_function" href="class_audio_kit.html#aff34dc957824c6618a02e517a3b20221">setSpeakerActive</a>(cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#a61712923e2b592811a9e97dbbc9cd108">dac_output</a>!=AUDIO_HAL_DAC_OUTPUT_LINE1);</div>
<div class="line"><span class="lineno">  325</span> </div>
<div class="line"><span class="lineno">  326</span>    is_active = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno">  327</span>    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno">  328</span>  }</div>
<div class="ttc" id="aclass_audio_kit_html_a64f95fca0a6f059803268dab33bf5d2c"><div class="ttname"><a href="class_audio_kit.html#a64f95fca0a6f059803268dab33bf5d2c">AudioKit::setActive</a></div><div class="ttdeci">bool setActive(bool active)</div><div class="ttdoc">Sets the codec active / inactive.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00354">AudioKitHAL.h:354</a></div></div>
<div class="ttc" id="aclass_audio_kit_html_ab6a8fa774b9a73c208418aa4fa9299cd"><div class="ttname"><a href="class_audio_kit.html#ab6a8fa774b9a73c208418aa4fa9299cd">AudioKit::end</a></div><div class="ttdeci">bool end()</div><div class="ttdoc">Stops the CODEC.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00331">AudioKitHAL.h:331</a></div></div>
<div class="ttc" id="aclass_audio_kit_html_accb5ea6f7ee146cbd512552e039ac5ac"><div class="ttname"><a href="class_audio_kit.html#accb5ea6f7ee146cbd512552e039ac5ac">AudioKit::setupHeadphoneDetection</a></div><div class="ttdeci">void setupHeadphoneDetection()</div><div class="ttdoc">Setup the headphone detection.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00631">AudioKitHAL.h:631</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a33583d45c4ab81f76d34712847e93907"><div class="ttname"><a href="struct_audio_kit_config.html#a33583d45c4ab81f76d34712847e93907">AudioKitConfig::bits_per_sample</a></div><div class="ttdeci">audio_hal_iface_bits_t bits_per_sample</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00086">AudioKitHAL.h:86</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a61712923e2b592811a9e97dbbc9cd108"><div class="ttname"><a href="struct_audio_kit_config.html#a61712923e2b592811a9e97dbbc9cd108">AudioKitConfig::dac_output</a></div><div class="ttdeci">audio_hal_dac_output_t dac_output</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00081">AudioKitHAL.h:81</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a8ae224cfd264634f4e09e6208cbcf6c0"><div class="ttname"><a href="struct_audio_kit_config.html#a8ae224cfd264634f4e09e6208cbcf6c0">AudioKitConfig::adc_input</a></div><div class="ttdeci">audio_hal_adc_input_t adc_input</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00080">AudioKitHAL.h:80</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a9c3d9f350c847402b7100662ed0b3fe6"><div class="ttname"><a href="struct_audio_kit_config.html#a9c3d9f350c847402b7100662ed0b3fe6">AudioKitConfig::fmt</a></div><div class="ttdeci">audio_hal_iface_format_t fmt</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00084">AudioKitHAL.h:84</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_add6c0604564d301e8582d8fc5a18d815"><div class="ttname"><a href="struct_audio_kit_config.html#add6c0604564d301e8582d8fc5a18d815">AudioKitConfig::master_slave_mode</a></div><div class="ttdeci">audio_hal_iface_mode_t master_slave_mode</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00083">AudioKitHAL.h:83</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_adefddc85df8f2a25c605ce58b6dde31a"><div class="ttname"><a href="struct_audio_kit_config.html#adefddc85df8f2a25c605ce58b6dde31a">AudioKitConfig::sample_rate</a></div><div class="ttdeci">audio_hal_iface_samples_t sample_rate</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00085">AudioKitHAL.h:85</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_ae4d2ebbeffb709eda313ff5dffdbb2ab"><div class="ttname"><a href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">AudioKitConfig::codec_mode</a></div><div class="ttdeci">audio_hal_codec_mode_t codec_mode</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00082">AudioKitHAL.h:82</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="afca95325642573eab6c4ad5ce0924063" name="afca95325642573eab6c4ad5ce0924063"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afca95325642573eab6c4ad5ce0924063">&#9670;&#160;</a></span>config()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_audio_kit_config.html">AudioKitConfig</a> AudioKit::config </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Provides the actual configuration. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00351">351</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  351</span>{ <span class="keywordflow">return</span> cfg; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae7f2a59c6f2bd31db85d75a65cec8ef0" name="ae7f2a59c6f2bd31db85d75a65cec8ef0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7f2a59c6f2bd31db85d75a65cec8ef0">&#9670;&#160;</a></span>defaultConfig()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_audio_kit_config.html">AudioKitConfig</a> AudioKit::defaultConfig </td>
          <td>(</td>
          <td class="paramtype">AudioKitInOut&#160;</td>
          <td class="paramname"><em>inout</em> = <code>AudioInputOutput</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Provides the default configuration for input or output. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00229">229</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  229</span>                                                                     {</div>
<div class="line"><span class="lineno">  230</span>    <a class="code hl_struct" href="struct_audio_kit_config.html">AudioKitConfig</a> result;</div>
<div class="line"><span class="lineno">  231</span>    <span class="keywordflow">switch</span>(inout){</div>
<div class="line"><span class="lineno">  232</span>      <span class="keywordflow">case</span> AudioOutput:</div>
<div class="line"><span class="lineno">  233</span>        result.<a class="code hl_variable" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a> = AUDIO_HAL_CODEC_MODE_DECODE; <span class="comment">// dac</span></div>
<div class="line"><span class="lineno">  234</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno">  235</span>      <span class="keywordflow">case</span> AudioInput:</div>
<div class="line"><span class="lineno">  236</span>        result.<a class="code hl_variable" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a> =  AUDIO_HAL_CODEC_MODE_ENCODE; <span class="comment">// adc</span></div>
<div class="line"><span class="lineno">  237</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno">  238</span>      <span class="keywordflow">default</span>:</div>
<div class="line"><span class="lineno">  239</span>        result.<a class="code hl_variable" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a> =  AUDIO_HAL_CODEC_MODE_BOTH;</div>
<div class="line"><span class="lineno">  240</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno">  241</span>    }</div>
<div class="line"><span class="lineno">  242</span>    <span class="keywordflow">return</span> result;</div>
<div class="line"><span class="lineno">  243</span>  }</div>
<div class="ttc" id="astruct_audio_kit_config_html"><div class="ttname"><a href="struct_audio_kit_config.html">AudioKitConfig</a></div><div class="ttdoc">Configuation for AudioKit.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00066">AudioKitHAL.h:66</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ab6a8fa774b9a73c208418aa4fa9299cd" name="ab6a8fa774b9a73c208418aa4fa9299cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6a8fa774b9a73c208418aa4fa9299cd">&#9670;&#160;</a></span>end()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Stops the CODEC. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00331">331</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  331</span>             {</div>
<div class="line"><span class="lineno">  332</span>    KIT_LOGI(LOG_METHOD);</div>
<div class="line"><span class="lineno">  333</span> </div>
<div class="line"><span class="lineno">  334</span><span class="preprocessor">#if SETUP_ESP32_I2S &amp;&amp; defined(ESP32)</span></div>
<div class="line"><span class="lineno">  335</span>    <span class="keywordflow">if</span> (cfg.is_i2s_active){</div>
<div class="line"><span class="lineno">  336</span>      <span class="comment">// uninstall i2s driver</span></div>
<div class="line"><span class="lineno">  337</span>      i2s_driver_uninstall(cfg.i2s_num);</div>
<div class="line"><span class="lineno">  338</span>    }</div>
<div class="line"><span class="lineno">  339</span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="lineno">  340</span>    <span class="comment">// stop codec driver</span></div>
<div class="line"><span class="lineno">  341</span>    audio_hal_ctrl_codec(hal_handle, cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a>, AUDIO_HAL_CTRL_STOP);</div>
<div class="line"><span class="lineno">  342</span>    <span class="comment">// deinit</span></div>
<div class="line"><span class="lineno">  343</span>    audio_hal_deinit(hal_handle);</div>
<div class="line"><span class="lineno">  344</span> </div>
<div class="line"><span class="lineno">  345</span>    is_active = <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno">  346</span>    hal_handle = 0;</div>
<div class="line"><span class="lineno">  347</span>    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno">  348</span>  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a0ad4e2e3004efe2769f9746df240b22a" name="a0ad4e2e3004efe2769f9746df240b22a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ad4e2e3004efe2769f9746df240b22a">&#9670;&#160;</a></span>headphoneStatus()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::headphoneStatus </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns true if the headphone was detected. </p>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00606">606</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  606</span>                         {</div>
<div class="line"><span class="lineno">  607</span>    <span class="keywordflow">return</span> headphonePin&gt;0 ? !digitalRead(headphonePin) : false;</div>
<div class="line"><span class="lineno">  608</span>  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae882b7e764b7b5fe978d470648cab80c" name="ae882b7e764b7b5fe978d470648cab80c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae882b7e764b7b5fe978d470648cab80c">&#9670;&#160;</a></span>isSDActive()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::isSDActive </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>checks if the SD is active </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00611">611</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  611</span>                    {</div>
<div class="line"><span class="lineno">  612</span>    <span class="keywordflow">return</span> cfg.sd_active;</div>
<div class="line"><span class="lineno">  613</span>  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a2f9a343c9f16b16ecf8f792b42914bc4" name="a2f9a343c9f16b16ecf8f792b42914bc4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f9a343c9f16b16ecf8f792b42914bc4">&#9670;&#160;</a></span>pinAdcDetect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinAdcDetect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the gpio number for adc detection. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others gpio number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00464">464</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  464</span>{ <span class="keywordflow">return</span> get_adc_detect_gpio(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a8409bf2cc841dc21d541e411e7971b08" name="a8409bf2cc841dc21d541e411e7971b08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8409bf2cc841dc21d541e411e7971b08">&#9670;&#160;</a></span>pinAuxin()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinAuxin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the gpio number for auxin detection. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others gpio number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00440">440</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  440</span>{ <span class="keywordflow">return</span> get_auxin_detect_gpio(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae86795128c627c1aa3b2814e1b621dbc" name="ae86795128c627c1aa3b2814e1b621dbc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae86795128c627c1aa3b2814e1b621dbc">&#9670;&#160;</a></span>pinBlueLed()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinBlueLed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get blue led gpio number. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others gpio number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00552">552</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  552</span>{ <span class="keywordflow">return</span> get_blue_led_gpio(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a72eb882cc63c1a31460dde328216ef2f" name="a72eb882cc63c1a31460dde328216ef2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72eb882cc63c1a31460dde328216ef2f">&#9670;&#160;</a></span>pinEs7243Mclk()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinEs7243Mclk </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the mclk gpio number of es7243. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others gpio number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00472">472</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  472</span>{ <span class="keywordflow">return</span> get_es7243_mclk_gpio(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a08284422f36622d2907ff9babf298213" name="a08284422f36622d2907ff9babf298213"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08284422f36622d2907ff9babf298213">&#9670;&#160;</a></span>pinGreenLed()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinGreenLed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get gpio number for green led. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others gpio number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00544">544</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  544</span>{ <span class="keywordflow">return</span> get_green_led_gpio(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a027e2297736e4108330ff0c6aa423046" name="a027e2297736e4108330ff0c6aa423046"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a027e2297736e4108330ff0c6aa423046">&#9670;&#160;</a></span>pinHeadphoneDetect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinHeadphoneDetect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the gpio number for headphone detection. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others gpio number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00448">448</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  448</span>{ <span class="keywordflow">return</span> get_headphone_detect_gpio(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a6d8b8e1fc20132d649b3a461e2d553d5" name="a6d8b8e1fc20132d649b3a461e2d553d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d8b8e1fc20132d649b3a461e2d553d5">&#9670;&#160;</a></span>pinInputMode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinInputMode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the number for mode-button. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00488">488</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  488</span>{ <span class="keywordflow">return</span> get_input_mode_id(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="aec9211dccce5236427d96b9193e9f5cb" name="aec9211dccce5236427d96b9193e9f5cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec9211dccce5236427d96b9193e9f5cb">&#9670;&#160;</a></span>pinInputPlay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinInputPlay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get number for play function. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00504">504</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  504</span>{ <span class="keywordflow">return</span> get_input_play_id(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a5f341c11af3fa7f0dcbe4ed7ef4f8319" name="a5f341c11af3fa7f0dcbe4ed7ef4f8319"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f341c11af3fa7f0dcbe4ed7ef4f8319">&#9670;&#160;</a></span>pinInputRec()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinInputRec </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the record-button id for adc-button. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others button id </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00480">480</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  480</span>{ <span class="keywordflow">return</span> get_input_rec_id(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae5e346727769ad17aa04c2b9efbbaf5a" name="ae5e346727769ad17aa04c2b9efbbaf5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5e346727769ad17aa04c2b9efbbaf5a">&#9670;&#160;</a></span>pinInputSet()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinInputSet </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get number for set function. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00496">496</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  496</span>{ <span class="keywordflow">return</span> get_input_set_id(); };</div>
</div><!-- fragment -->
</div>
</div>
<a id="a43c7177de0f35ef6ec97ed48c7a7363e" name="a43c7177de0f35ef6ec97ed48c7a7363e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43c7177de0f35ef6ec97ed48c7a7363e">&#9670;&#160;</a></span>pinPaEnable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinPaEnable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the gpio number for PA enable. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others gpio number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00456">456</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  456</span>{ <span class="keywordflow">return</span> get_pa_enable_gpio(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ac57425ba16af4f55b64e62447ad88a1f" name="ac57425ba16af4f55b64e62447ad88a1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac57425ba16af4f55b64e62447ad88a1f">&#9670;&#160;</a></span>pinResetBoard()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinResetBoard </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get gpio number to reset the board. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others gpio number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00536">536</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  536</span>{ <span class="keywordflow">return</span> get_reset_board_gpio(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="adbb606132fa17bb1634c67a5c56f6329" name="adbb606132fa17bb1634c67a5c56f6329"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbb606132fa17bb1634c67a5c56f6329">&#9670;&#160;</a></span>pinResetCodec()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinResetCodec </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get reset codec gpio number. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others gpio number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00528">528</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  528</span>{ <span class="keywordflow">return</span> get_reset_codec_gpio(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a3e651dc5d8d90c1e89edc833b5188951" name="a3e651dc5d8d90c1e89edc833b5188951"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e651dc5d8d90c1e89edc833b5188951">&#9670;&#160;</a></span>pinSpiCs()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinSpiCs </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>SPI CS Pin for SD Drive. </p>
<dl class="section return"><dt>Returns</dt><dd>int8_t </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00559">559</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  559</span>                    {</div>
<div class="line"><span class="lineno">  560</span>    <span class="keywordflow">return</span> spi_cs_pin;</div>
<div class="line"><span class="lineno">  561</span>  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ab57147058b00536b64f7045d03729771" name="ab57147058b00536b64f7045d03729771"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab57147058b00536b64f7045d03729771">&#9670;&#160;</a></span>pinVolumeDown()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinVolumeDown </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get number for volume down function. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00520">520</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  520</span>{ <span class="keywordflow">return</span> get_input_voldown_id(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a322b6834d0d24a31c92ab2e1bcf5dfc8" name="a322b6834d0d24a31c92ab2e1bcf5dfc8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a322b6834d0d24a31c92ab2e1bcf5dfc8">&#9670;&#160;</a></span>pinVolumeUp()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::pinVolumeUp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>number for volume up function </p>
<dl class="section return"><dt>Returns</dt><dd>-1 non-existent Others number </dd></dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00512">512</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  512</span>{ <span class="keywordflow">return</span> get_input_volup_id(); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a64f95fca0a6f059803268dab33bf5d2c" name="a64f95fca0a6f059803268dab33bf5d2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64f95fca0a6f059803268dab33bf5d2c">&#9670;&#160;</a></span>setActive()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::setActive </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>active</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the codec active / inactive. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00354">354</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  354</span>                              {</div>
<div class="line"><span class="lineno">  355</span>    <span class="keywordflow">return</span> audio_hal_ctrl_codec( hal_handle, cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a>, active ? AUDIO_HAL_CTRL_START : AUDIO_HAL_CTRL_STOP) == ESP_OK;</div>
<div class="line"><span class="lineno">  356</span>  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="aac99fb5dfb87a965451e076f404224fd" name="aac99fb5dfb87a965451e076f404224fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac99fb5dfb87a965451e076f404224fd">&#9670;&#160;</a></span>setMute()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::setMute </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>mute</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Mutes the output. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00359">359</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  359</span>                          {</div>
<div class="line"><span class="lineno">  360</span>    <span class="keywordflow">return</span> audio_hal_set_mute(hal_handle, mute) == ESP_OK;</div>
<div class="line"><span class="lineno">  361</span>  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a752aaff497b20ea1ea4e9840f61dae80" name="a752aaff497b20ea1ea4e9840f61dae80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a752aaff497b20ea1ea4e9840f61dae80">&#9670;&#160;</a></span>setSampleRate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::setSampleRate </td>
          <td>(</td>
          <td class="paramtype">audio_hal_iface_samples_t&#160;</td>
          <td class="paramname"><em>sample_rate</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Just update the sample rate. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00407">407</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  407</span>                                                           {</div>
<div class="line"><span class="lineno">  408</span>    <span class="keywordtype">bool</span> result = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno">  409</span>    <span class="comment">// update values</span></div>
<div class="line"><span class="lineno">  410</span>    audio_hal_conf.i2s_iface.samples = cfg.<a class="code hl_variable" href="struct_audio_kit_config.html#adefddc85df8f2a25c605ce58b6dde31a">sample_rate</a> = sample_rate;</div>
<div class="line"><span class="lineno">  411</span> </div>
<div class="line"><span class="lineno">  412</span>    <span class="comment">// apply new value</span></div>
<div class="line"><span class="lineno">  413</span>    <span class="keywordflow">if</span> (is_active){</div>
<div class="line"><span class="lineno">  414</span>      <span class="comment">// esp_err_t audio_hal_codec_iface_config(audio_hal_handle_t audio_hal, audio_hal_codec_mode_t mode, audio_hal_codec_i2s_iface_t *iface)</span></div>
<div class="line"><span class="lineno">  415</span>      <span class="keywordflow">if</span> (audio_hal_codec_iface_config(hal_handle, audio_hal_conf.codec_mode, &amp;audio_hal_conf.i2s_iface) != ESP_OK) {</div>
<div class="line"><span class="lineno">  416</span>        KIT_LOGE(<span class="stringliteral">&quot;audio_hal_ctrl_codec&quot;</span>);</div>
<div class="line"><span class="lineno">  417</span>        result = <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno">  418</span>      }</div>
<div class="line"><span class="lineno">  419</span><span class="preprocessor">#if SETUP_ESP32_I2S &amp;&amp; defined(ESP32)</span></div>
<div class="line"><span class="lineno">  420</span>      <span class="comment">// update I2S</span></div>
<div class="line"><span class="lineno">  421</span>      <span class="keywordflow">if</span> (cfg.is_i2s_active){</div>
<div class="line"><span class="lineno">  422</span>        <span class="keywordflow">if</span> (i2s_set_sample_rates(cfg.i2s_num, cfg.<a class="code hl_function" href="struct_audio_kit_config.html#a33b28874f411a9c353f6a0fa62261289">sampleRate</a>()) != ESP_OK)  {</div>
<div class="line"><span class="lineno">  423</span>          KIT_LOGE(<span class="stringliteral">&quot;i2s_set_sample_rates&quot;</span>);</div>
<div class="line"><span class="lineno">  424</span>          result = <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno">  425</span>        }</div>
<div class="line"><span class="lineno">  426</span>      }</div>
<div class="line"><span class="lineno">  427</span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="lineno">  428</span>    }</div>
<div class="line"><span class="lineno">  429</span> </div>
<div class="line"><span class="lineno">  430</span>    <span class="keywordflow">return</span> result;</div>
<div class="line"><span class="lineno">  431</span>  }</div>
<div class="ttc" id="astruct_audio_kit_config_html_a33b28874f411a9c353f6a0fa62261289"><div class="ttname"><a href="struct_audio_kit_config.html#a33b28874f411a9c353f6a0fa62261289">AudioKitConfig::sampleRate</a></div><div class="ttdeci">uint32_t sampleRate()</div><div class="ttdoc">Provides the sample rate in samples per second.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00106">AudioKitHAL.h:106</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aff34dc957824c6618a02e517a3b20221" name="aff34dc957824c6618a02e517a3b20221"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff34dc957824c6618a02e517a3b20221">&#9670;&#160;</a></span>setSpeakerActive()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void AudioKit::setSpeakerActive </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>active</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Activates/deactivates the speaker amplifier output This is working only if the driver is supporting the functionality. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">active</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00568">568</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  568</span>                                     {</div>
<div class="line"><span class="lineno">  569</span>    <span class="keywordtype">int</span> paPin = get_pa_enable_gpio();</div>
<div class="line"><span class="lineno">  570</span>    <span class="keywordflow">if</span> (paPin&gt;0){</div>
<div class="line"><span class="lineno">  571</span>        digitalWrite(paPin, active);</div>
<div class="line"><span class="lineno">  572</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno">  573</span>      KIT_LOGW(<span class="stringliteral">&quot;setSpeakerActive not supported&quot;</span>);</div>
<div class="line"><span class="lineno">  574</span>    }</div>
<div class="line"><span class="lineno">  575</span>  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="accb5ea6f7ee146cbd512552e039ac5ac" name="accb5ea6f7ee146cbd512552e039ac5ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#accb5ea6f7ee146cbd512552e039ac5ac">&#9670;&#160;</a></span>setupHeadphoneDetection()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void AudioKit::setupHeadphoneDetection </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Setup the headphone detection. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00631">631</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  631</span>                                 {</div>
<div class="line"><span class="lineno">  632</span>    int8_t paPin = <a class="code hl_function" href="class_audio_kit.html#a43c7177de0f35ef6ec97ed48c7a7363e">pinPaEnable</a>();</div>
<div class="line"><span class="lineno">  633</span>    <span class="keywordflow">if</span> (paPin&gt;0){</div>
<div class="line"><span class="lineno">  634</span>      headphonePin = <a class="code hl_function" href="class_audio_kit.html#a027e2297736e4108330ff0c6aa423046">pinHeadphoneDetect</a>();</div>
<div class="line"><span class="lineno">  635</span>      <span class="keywordflow">if</span> (headphonePin&gt;0){</div>
<div class="line"><span class="lineno">  636</span>        pinMode(headphonePin, INPUT_PULLUP);</div>
<div class="line"><span class="lineno">  637</span>        pinMode(paPin, OUTPUT);</div>
<div class="line"><span class="lineno">  638</span>        KIT_LOGI(<span class="stringliteral">&quot;headphone detection is active&quot;</span>);</div>
<div class="line"><span class="lineno">  639</span>      } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno">  640</span>        KIT_LOGI(<span class="stringliteral">&quot;headphone detection not supported&quot;</span>);    </div>
<div class="line"><span class="lineno">  641</span>      }</div>
<div class="line"><span class="lineno">  642</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno">  643</span>      KIT_LOGI(<span class="stringliteral">&quot;headphone detection: PA not supported&quot;</span>);</div>
<div class="line"><span class="lineno">  644</span>    }</div>
<div class="line"><span class="lineno">  645</span>  }</div>
<div class="ttc" id="aclass_audio_kit_html_a027e2297736e4108330ff0c6aa423046"><div class="ttname"><a href="class_audio_kit.html#a027e2297736e4108330ff0c6aa423046">AudioKit::pinHeadphoneDetect</a></div><div class="ttdeci">int8_t pinHeadphoneDetect()</div><div class="ttdoc">Get the gpio number for headphone detection.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00448">AudioKitHAL.h:448</a></div></div>
<div class="ttc" id="aclass_audio_kit_html_a43c7177de0f35ef6ec97ed48c7a7363e"><div class="ttname"><a href="class_audio_kit.html#a43c7177de0f35ef6ec97ed48c7a7363e">AudioKit::pinPaEnable</a></div><div class="ttdeci">int8_t pinPaEnable()</div><div class="ttdoc">Get the gpio number for PA enable.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00456">AudioKitHAL.h:456</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="adae205b1d34fa8c3c00ac891f980a7dd" name="adae205b1d34fa8c3c00ac891f980a7dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adae205b1d34fa8c3c00ac891f980a7dd">&#9670;&#160;</a></span>setVolume()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::setVolume </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>vol</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00364">364</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  364</span>                          {</div>
<div class="line"><span class="lineno">  365</span>    <span class="keywordflow">return</span> (vol &gt; 0) ? audio_hal_set_volume(hal_handle, vol) == ESP_OK : <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno">  366</span>  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a7d8fe8f564faf19535f9686aa23ed414" name="a7d8fe8f564faf19535f9686aa23ed414"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d8fe8f564faf19535f9686aa23ed414">&#9670;&#160;</a></span>volume()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int AudioKit::volume </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determines the volume %. </p>

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00369">369</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>
<div class="fragment"><div class="line"><span class="lineno">  369</span>               {</div>
<div class="line"><span class="lineno">  370</span>    <span class="keywordtype">int</span> <a class="code hl_function" href="class_audio_kit.html#a7d8fe8f564faf19535f9686aa23ed414">volume</a>;</div>
<div class="line"><span class="lineno">  371</span>    <span class="keywordflow">if</span> (audio_hal_get_volume(hal_handle, &amp;<a class="code hl_function" href="class_audio_kit.html#a7d8fe8f564faf19535f9686aa23ed414">volume</a>) != ESP_OK) {</div>
<div class="line"><span class="lineno">  372</span>      <a class="code hl_function" href="class_audio_kit.html#a7d8fe8f564faf19535f9686aa23ed414">volume</a> = -1;</div>
<div class="line"><span class="lineno">  373</span>    }</div>
<div class="line"><span class="lineno">  374</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="class_audio_kit.html#a7d8fe8f564faf19535f9686aa23ed414">volume</a>;</div>
<div class="line"><span class="lineno">  375</span>  }</div>
<div class="ttc" id="aclass_audio_kit_html_a7d8fe8f564faf19535f9686aa23ed414"><div class="ttname"><a href="class_audio_kit.html#a7d8fe8f564faf19535f9686aa23ed414">AudioKit::volume</a></div><div class="ttdeci">int volume()</div><div class="ttdoc">Determines the volume %.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_h_a_l_8h_source.html#l00369">AudioKitHAL.h:369</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa41e2c821c6f241a73087cef961584c6" name="aa41e2c821c6f241a73087cef961584c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa41e2c821c6f241a73087cef961584c6">&#9670;&#160;</a></span>audio_hal_conf</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">audio_hal_codec_config_t AudioKit::audio_hal_conf</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00618">618</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>

</div>
</div>
<a id="a0010684767aaabad3a17e814de29a706" name="a0010684767aaabad3a17e814de29a706"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0010684767aaabad3a17e814de29a706">&#9670;&#160;</a></span>cfg</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_audio_kit_config.html">AudioKitConfig</a> AudioKit::cfg</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00617">617</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>

</div>
</div>
<a id="afd988074ddfa3dfd5af0c5abb49cd813" name="afd988074ddfa3dfd5af0c5abb49cd813"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd988074ddfa3dfd5af0c5abb49cd813">&#9670;&#160;</a></span>hal_handle</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">audio_hal_handle_t AudioKit::hal_handle = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00619">619</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>

</div>
</div>
<a id="a0acc1eda4fe16d9134eec14d07a98c3c" name="a0acc1eda4fe16d9134eec14d07a98c3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0acc1eda4fe16d9134eec14d07a98c3c">&#9670;&#160;</a></span>headphoneIsConnected</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::headphoneIsConnected = false</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00622">622</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>

</div>
</div>
<a id="a0704b3538e7b3a586b9046ba0c12dd51" name="a0704b3538e7b3a586b9046ba0c12dd51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0704b3538e7b3a586b9046ba0c12dd51">&#9670;&#160;</a></span>headphonePin</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::headphonePin = -1</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00624">624</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>

</div>
</div>
<a id="a49abf7c51694cbfd5f11e013a6e6f687" name="a49abf7c51694cbfd5f11e013a6e6f687"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49abf7c51694cbfd5f11e013a6e6f687">&#9670;&#160;</a></span>iface</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">audio_hal_codec_i2s_iface_t AudioKit::iface</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00620">620</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>

</div>
</div>
<a id="a1b343a0c28811ea8c6bc1c08eba2eb06" name="a1b343a0c28811ea8c6bc1c08eba2eb06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b343a0c28811ea8c6bc1c08eba2eb06">&#9670;&#160;</a></span>is_active</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool AudioKit::is_active = false</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00616">616</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>

</div>
</div>
<a id="aadbbd40a678301a7963b1eeca0a5d8d2" name="aadbbd40a678301a7963b1eeca0a5d8d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadbbd40a678301a7963b1eeca0a5d8d2">&#9670;&#160;</a></span>speakerChangeTimeout</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long AudioKit::speakerChangeTimeout = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00623">623</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>

</div>
</div>
<a id="a770158e788b901e35a0ac9a97392a67c" name="a770158e788b901e35a0ac9a97392a67c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a770158e788b901e35a0ac9a97392a67c">&#9670;&#160;</a></span>spi_cs_pin</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t AudioKit::spi_cs_pin</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_audio_kit_h_a_l_8h_source.html#l00621">621</a> of file <a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/<a class="el" href="_audio_kit_h_a_l_8h_source.html">AudioKitHAL.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
</small></address>
</body>
</html>
